From: Christoph Egger Date: Wed, 8 Jun 2011 12:39:31 +0000 (+0100) Subject: nestedsvm: Support Decodeassist X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/%22bookmarks://%22Dat/%22http:/www.example.com/cgi/%22https:/%22bookmarks:/%22Dat?a=commitdiff_plain;h=7096575dcdc0d87e16e381bf87d937d852560a73;p=xen.git nestedsvm: Support Decodeassist Offer l1 guest to use decode assist if available in hardware. Signed-off-by: Christoph Egger --- diff --git a/tools/libxc/xc_cpuid_x86.c b/tools/libxc/xc_cpuid_x86.c index 71b598d533..ef23358754 100644 --- a/tools/libxc/xc_cpuid_x86.c +++ b/tools/libxc/xc_cpuid_x86.c @@ -153,7 +153,8 @@ static void amd_xc_cpuid_policy( * available in hw and which are implemented */ regs[3] &= (SVM_FEATURE_NPT | SVM_FEATURE_LBRV | \ - SVM_FEATURE_NRIPS | SVM_FEATURE_PAUSEFILTER); + SVM_FEATURE_NRIPS | SVM_FEATURE_PAUSEFILTER | \ + SVM_FEATURE_DECODEASSISTS); /* Pass 2: Always enable SVM features which are emulated */ regs[3] |= SVM_FEATURE_VMCBCLEAN; diff --git a/xen/arch/x86/hvm/svm/nestedsvm.c b/xen/arch/x86/hvm/svm/nestedsvm.c index 86af8ed1a7..5812f73d9b 100644 --- a/xen/arch/x86/hvm/svm/nestedsvm.c +++ b/xen/arch/x86/hvm/svm/nestedsvm.c @@ -1056,6 +1056,10 @@ nsvm_vmcb_prepare4vmexit(struct vcpu *v) /* NextRIP */ ns_vmcb->nextrip = n2vmcb->nextrip; + /* Decode Assist */ + ns_vmcb->guest_ins_len = n2vmcb->guest_ins_len; + memcpy(ns_vmcb->guest_ins, n2vmcb->guest_ins, sizeof(ns_vmcb->guest_ins)); + /* * VMCB Save State Area */